using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class FBFriend : GeneratedMessageLite<FBFriend, FBFriend.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<FBFriend, FBFriend.Builder>
		{
			private bool resultIsReadOnly;
			private FBFriend result;
			protected override FBFriend.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override FBFriend MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override FBFriend DefaultInstanceForType
			{
				get
				{
					return FBFriend.DefaultInstance;
				}
			}
			public ulong ID
			{
				get
				{
					return this.result.ID;
				}
				set
				{
					this.SetID(value);
				}
			}
			public string Name
			{
				get
				{
					return this.result.Name;
				}
				set
				{
					this.SetName(value);
				}
			}
			public uint ImgKey
			{
				get
				{
					return this.result.ImgKey;
				}
				set
				{
					this.SetImgKey(value);
				}
			}
			public Builder()
			{
				this.result = FBFriend.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(FBFriend cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private FBFriend PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					FBFriend other = this.result;
					this.result = new FBFriend();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override FBFriend.Builder Clear()
			{
				this.result = FBFriend.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override FBFriend.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new FBFriend.Builder(this.result);
				}
				return new FBFriend.Builder().MergeFrom(this.result);
			}
			public override FBFriend BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override FBFriend.Builder MergeFrom(IMessageLite other)
			{
				if (other is FBFriend)
				{
					return this.MergeFrom((FBFriend)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override FBFriend.Builder MergeFrom(FBFriend other)
			{
				return this;
			}
			public override FBFriend.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override FBFriend.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(FBFriend._fBFriendFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = FBFriend._fBFriendFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 8u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 8u)
						{
							this.result.hasID = input.ReadUInt64(ref this.result.iD_);
							continue;
						}
					}
					else
					{
						if (num3 == 18u)
						{
							this.result.hasName = input.ReadString(ref this.result.name_);
							continue;
						}
						if (num3 == 24u)
						{
							this.result.hasImgKey = input.ReadUInt32(ref this.result.imgKey_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public FBFriend.Builder SetID(ulong value)
			{
				this.PrepareBuilder();
				this.result.hasID = true;
				this.result.iD_ = value;
				return this;
			}
			public FBFriend.Builder ClearID()
			{
				this.PrepareBuilder();
				this.result.hasID = false;
				this.result.iD_ = 0uL;
				return this;
			}
			public FBFriend.Builder SetName(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasName = true;
				this.result.name_ = value;
				return this;
			}
			public FBFriend.Builder ClearName()
			{
				this.PrepareBuilder();
				this.result.hasName = false;
				this.result.name_ = "";
				return this;
			}
			public FBFriend.Builder SetImgKey(uint value)
			{
				this.PrepareBuilder();
				this.result.hasImgKey = true;
				this.result.imgKey_ = value;
				return this;
			}
			public FBFriend.Builder ClearImgKey()
			{
				this.PrepareBuilder();
				this.result.hasImgKey = false;
				this.result.imgKey_ = 0u;
				return this;
			}
		}
		public const int IDFieldNumber = 1;
		public const int NameFieldNumber = 2;
		public const int ImgKeyFieldNumber = 3;
		private static readonly FBFriend defaultInstance;
		private static readonly string[] _fBFriendFieldNames;
		private static readonly uint[] _fBFriendFieldTags;
		private bool hasID;
		private ulong iD_;
		private bool hasName;
		private string name_ = "";
		private bool hasImgKey;
		private uint imgKey_;
		private int memoizedSerializedSize = -1;
		public static FBFriend DefaultInstance
		{
			get
			{
				return FBFriend.defaultInstance;
			}
		}
		public override FBFriend DefaultInstanceForType
		{
			get
			{
				return FBFriend.DefaultInstance;
			}
		}
		protected override FBFriend ThisMessage
		{
			get
			{
				return this;
			}
		}
		public ulong ID
		{
			get
			{
				return this.iD_;
			}
		}
		public string Name
		{
			get
			{
				return this.name_;
			}
		}
		public uint ImgKey
		{
			get
			{
				return this.imgKey_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasID && this.hasImgKey;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasID)
				{
					num += CodedOutputStream.ComputeUInt64Size(1, this.ID);
				}
				if (this.hasName)
				{
					num += CodedOutputStream.ComputeStringSize(2, this.Name);
				}
				if (this.hasImgKey)
				{
					num += CodedOutputStream.ComputeUInt32Size(3, this.ImgKey);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private FBFriend()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] fBFriendFieldNames = FBFriend._fBFriendFieldNames;
			if (this.hasID)
			{
				output.WriteUInt64(1, fBFriendFieldNames[0], this.ID);
			}
			if (this.hasName)
			{
				output.WriteString(2, fBFriendFieldNames[2], this.Name);
			}
			if (this.hasImgKey)
			{
				output.WriteUInt32(3, fBFriendFieldNames[1], this.ImgKey);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasID)
			{
				num ^= this.iD_.GetHashCode();
			}
			if (this.hasName)
			{
				num ^= this.name_.GetHashCode();
			}
			if (this.hasImgKey)
			{
				num ^= this.imgKey_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			FBFriend fBFriend = object_0 as FBFriend;
			return fBFriend != null && (this.hasID == fBFriend.hasID && (!this.hasID || this.iD_.Equals(fBFriend.iD_))) && (this.hasName == fBFriend.hasName && (!this.hasName || this.name_.Equals(fBFriend.name_))) && (this.hasImgKey == fBFriend.hasImgKey && (!this.hasImgKey || this.imgKey_.Equals(fBFriend.imgKey_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<FBFriend, FBFriend.Builder>.PrintField("ID", this.hasID, this.iD_, writer);
			GeneratedMessageLite<FBFriend, FBFriend.Builder>.PrintField("Name", this.hasName, this.name_, writer);
			GeneratedMessageLite<FBFriend, FBFriend.Builder>.PrintField("ImgKey", this.hasImgKey, this.imgKey_, writer);
		}
		public static FBFriend ParseFrom(byte[] data)
		{
			return FBFriend.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private FBFriend MakeReadOnly()
		{
			return this;
		}
		public static FBFriend.Builder CreateBuilder()
		{
			return new FBFriend.Builder();
		}
		public override FBFriend.Builder ToBuilder()
		{
			return FBFriend.CreateBuilder(this);
		}
		public override FBFriend.Builder CreateBuilderForType()
		{
			return new FBFriend.Builder();
		}
		public static FBFriend.Builder CreateBuilder(FBFriend prototype)
		{
			return new FBFriend.Builder(prototype);
		}
		static FBFriend()
		{
			FBFriend.defaultInstance = new FBFriend().MakeReadOnly();
			FBFriend._fBFriendFieldNames = new string[]
			{
				"ID",
				"ImgKey",
				"Name"
			};
			FBFriend._fBFriendFieldTags = new uint[]
			{
				8u,
				24u,
				18u
			};
			object.ReferenceEquals(micromsg.Proto.FBFriend.Descriptor, null);
		}
	}
}
